import com.Student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Start {
    public static void main(String[] args) {
        ApplicationContext context=new ClassPathXmlApplicationContext("spring-config.xml");
        Student stu=context.getBean("stu",Student.class);
        stu.print("张三",10,56);
    }
    public static void main1(String[] args) {
        //得到spring对象
        ApplicationContext context= new ClassPathXmlApplicationContext("spring-config.xml");
        //得到bean对象
        Hello hello= context.getBean("hello",Hello.class);
        //使用bean
        hello.print();
    }
}
